//##############################################################################
//#    CuteWebshot is an application which can be used to render
//#    screenshots from webpages.
//#
//#    Copyright (C) 2010  Juhapekka Piiroinen
//#
//#    This program is free software: you can redistribute it and/or modify
//#    it under the terms of the GNU General Public License as published by
//#    the Free Software Foundation, either version 3 of the License, or
//#    (at your option) any later version.
//#
//#    This program is distributed in the hope that it will be useful,
//#    but WITHOUT ANY WARRANTY; without even the implied warranty of
//#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//#    GNU General Public License for more details.
//#
//#    You should have received a copy of the GNU General Public License
//#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
//#############################################################################
//# Contact: juhapekka.piiroinen@gmail.com
//#############################################################################
#ifndef FILETOSTRINGLISTTHREAD_H
#define FILETOSTRINGLISTTHREAD_H

#include "common.h"
#include <QThread>
#include <QFile>
#include <QUrl>
#include <QStringList>
#include <QStringListModel>

class FileToStringListThread : public QThread
{
    Q_OBJECT

public:
     void run();
     void setFileName(const QString filename) { m_filename = filename; }
     void setStringListModel(QStringListModel* model) { m_model = model; }
     void stop() { this->m_bStop = true; }

signals:
     void ready(QStringList);
     void status(QString);

protected:
     QString m_filename;
     QStringListModel* m_model;
     bool m_bStop;
};

#endif // FILETOSTRINGLISTTHREAD_H
